// IAM列表数据
export const columns = [
  {
    title: '账号名',
    dataIndex: 'iamName',
    width: 120,
  },
  {
    title: 'AK',
    dataIndex: 'ak',
    width: 120,
  },
  {
    title: 'SK',
    dataIndex: 'sk',
    width: 120,
  },
  {
    title: '密码',
    dataIndex: 'password',
    width: 120,
  },
  {
    title: '操作',
    key: 'action',
    dataIndex: 'action',
    width: 100,
  },
];

// IAM搜索框数据
export const searchFormSchema = [
  {
    field: 'accountName',
    label: '账号名',
    component: 'Input',
    componentProps: {
      placeholder: '请输入账号名',
    },
    colProps: { span: 4 },
  },
];

// IAM新增模块部分
export const createIamSchema = [
  {
    field: 'iamName',
    label: '账号名',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入账号名',
    },
  },
  {
    field: 'ak',
    label: 'AK',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入AK',
    },
  },
  {
    field: 'sk',
    label: 'SK',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入SK',
    },
  },
  {
    field: 'password',
    label: '密码',
    required: true,
    component: 'InputPassword',
    componentProps: {
      placeholder: '请输入密码',
    },
  },
];

export type Page = {
  current: number;
  pageSizeOptions: string[];
  total: number;
  pageSize: number;
};
export const iamRules = {
  iamName: [{ trigger: 'change', required: true, message: '请填写账号名' }],
  ak: [{ trigger: 'change', required: true, message: '请填写AK' }],
  sk: [{ trigger: 'change', required: true, message: '请填写SK' }],
  password: [{ trigger: 'change', required: true, message: '请填写密码' }],
};
